Skip to content

WAIT: Show recipient job title, agency, and city/state on the recipients page#1821

Open
maebeale wants to merge 2 commits into
mainfrom
maebeale/scholarship-recipient-job-info
Open

WAIT: Show recipient job title, agency, and city/state on the recipients page#1821
maebeale wants to merge 2 commits into
mainfrom
maebeale/scholarship-recipient-job-info

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

REVIEW NEEDED: 📖 Read — light-logic: a new EventDashboard method + a view swap, no migrations or data changes

Each scholarship recipient's affiliation line(s) on the recipients page now derive from the org(s) connected to their registration (the snapshot taken at registration plus any an admin linked later), not from all of their affiliations.

  • For each connected org: show the registrant's active job title with the agency name (City, ST) (Organization#program_location).
  • No active job affiliation there → fall back to a title-less line, but only when they're a facilitator at that org and the org's status is Active or Pending.
  • Several connected orgs → several lines (sorted by name); none qualifying → no line.

Logic lives in EventDashboard#recipient_affiliations_by_registrant (preloads org addresses + status to avoid N+1); the view just renders the rows.

Why

The old line iterated every non-facilitator affiliation active at the event date. Anchoring on the registration's orgs keeps what's shown tied to what the registration is actually about, and adds the agency location + a facilitator fallback.

The recipients page now drives each recipient's affiliation line(s) off the
org(s) connected to their registration rather than all of their affiliations.
For each connected org it shows the registrant's active job title with the
agency name and city/state; absent a job affiliation it falls back to a
title-less line when they facilitate at that org and the org is active or
pending. Multiple connected orgs render multiple lines.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
end

# Org statuses that still warrant showing a facilitator-only fallback line.
FALLBACK_FACILITATOR_STATUSES = %w[Active Pending].freeze

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: "active_or_pending" is read as the organization's status (Active/Pending) — the only Active/Pending concept in the schema (affiliations have no pending state). The facilitator fallback shows only when the registrant facilitates at the org and the org is Active/Pending.

Lead with the job title, then the agency name and its city/state, per the
preferred display order.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maebeale maebeale changed the title Show recipient job title, agency, and city/state on the recipients page WAIT: Show recipient job title, agency, and city/state on the recipients page Jun 22, 2026
@maebeale

Copy link
Copy Markdown
Collaborator Author
Screenshot 2026-06-21 at 9 06 21 PM

@maebeale
maebeale marked this pull request as ready for review June 22, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant